home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / XML Utilities / Professional Programmer XSL IDE / Xselerator25.msi / Data.Cab / F26818_CopyOfInternetEmployees.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2001-10-04  |  1.3 KB  |  39 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- ===========================================================
  3.   Category:       XSLT
  4.   Sub-category:   xsl:copy-of
  5.   Author:         David Silverlight
  6.                   HeadGeek@xmlpitstop.com
  7.   Created:        2001-05-16
  8.   Description:-
  9.     This stylesheet processes a set of XML elements and displays
  10.     the result in XML. An XPath statement can be applied to the
  11.     select to copy selected elements to the result tree.  In
  12.     this example, we are outputting only the elements that
  13.     contain employee elements whose department
  14.     element = "Internet"
  15. ================================================================ -->
  16. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  17. <xsl:output method="xml"/>
  18.  
  19.  
  20.  
  21. <!-- Template for root rule -->
  22. <xsl:template match="/">
  23.  
  24.     <!--This stylesheet processes a set of XML elements and 
  25.     displays the result in XML. An XPath statement can be applied to the 
  26.     select to copy selected elements to the result tree. In this example, we are 
  27.     outputting only the elements that contain employee elements whose department 
  28.     element = "Internet" -->
  29.  
  30.     <employees>
  31.     <xsl:copy-of select="employees/employee[department='Internet']" />
  32.     </employees>
  33.  
  34.  
  35. </xsl:template>
  36.  
  37.  
  38.  
  39. </xsl:stylesheet>